Skip to main content

Delete Mail Message

AutomatR.Outlook.DeleteMailMessage

The "Delete Mail Message" activity in AutomatR is part of the Outlook activities package, facilitating the deletion of an email message from Microsoft Outlook. This activity streamlines email management tasks within Outlook, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
Mail MessageSpecifies the email message to be removed. Requires a MailItem object representing the email message.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before starting the activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResponseOutputs a Boolean value indicating whether the mail deletion was successful (true) or encountered errors (false). Variables of Boolean type to store the operation result.

How to use:

  1. Drag and drop the "Delete Mail Message" activity onto the workflow.
  2. Configure the properties by specifying the email message to be deleted.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to delete the specified email message from Outlook.

Example:

Consider an example where the "Delete Mail Message" activity is used to delete a specific email from Outlook:

Delete Mail Message:
Display Name: "Delete Important Email"
Mail Message: importantMailItem
Response: isDeletionSuccessful

In this example, the activity deletes the email message represented by the importantMailItem object from the Outlook inbox. The result of the operation (success or failure) is stored in the Boolean variable isDeletionSuccessful for further handling in the workflow.